package com.tpshion.cloud.auth.utils.support;

import com.fasterxml.jackson.annotation.JsonInclude;

import java.util.List;

/**
 * 分配菜单权限数据
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class MenuData {

    private String id;

    private String title;

    private String icon;

    private String sysCode;

    private String name;

    /**
     * 菜单是否展开,默认展开
     */
    private boolean expand = true;

    /**
     * 菜单是否选中
     */
    private boolean checked;

    /**
     * 子菜单
     */
    private List<MenuData> children;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getSysCode() {
        return sysCode;
    }

    public void setSysCode(String sysCode) {
        this.sysCode = sysCode;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isExpand() {
        return expand;
    }

    public void setExpand(boolean expand) {
        this.expand = expand;
    }

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    public List<MenuData> getChildren() {
        return children;
    }

    public void setChildren(List<MenuData> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return "MenuData{" +
                "id='" + id + '\'' +
                ", title='" + title + '\'' +
                ", icon='" + icon + '\'' +
                ", sysCode='" + sysCode + '\'' +
                ", name='" + name + '\'' +
                ", expand=" + expand +
                ", checked=" + checked +
                ", children=" + children +
                '}';
    }
}
